﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    	<asp:DataList ID="DataList1" runat="server" RepeatColumns="7" 
			onitemcommand="DataList1_ItemCommand">
			<ItemTemplate>
				<asp:Image ID="Image1" runat="server" 
					ImageUrl='<%# "Pictures/" + DataBinder.Eval(Container.DataItem, "产品图片") %>' />
				<br />
				<asp:HyperLink ID="HyperLink1" runat="server" 
					NavigateUrl='<%# "ShowProduct.aspx?pid=" +DataBinder.Eval(Container.DataItem, "产品ID") %>' Text='<%# DataBinder.Eval(Container.DataItem, "产品名称") %>'></asp:HyperLink>
				<br />
				京东价：<asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="Red" 
					Text='<%# "￥"+DataBinder.Eval(Container.DataItem, "单价") %>'></asp:Label><br />
				<br />
				<asp:ImageButton ID="ImageButton1" runat="server" 
					CommandArgument='<%# DataBinder.Eval(Container.DataItem, "产品ID") %>' 
					CommandName="Buy" ImageUrl="Images/buy.gif" onclick="ImageButton1_Click" />
				<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
			</ItemTemplate>
		</asp:DataList>
    
    </div>
    </form>
</body>
</html>
